import Http from '../http';

interface DeviceApiResult {
    device:Device,
    strategy:Strategy,
    port : Port[]
}


export async function getDeviceApi(deviceId:number) :Promise<DeviceApiResult | null>{
    let { data } = await Http.get('device/' + deviceId)
    return data
}

export async function getDeviceStrategyApi(deviceId:number) :Promise<Strategy | null>{
    let { data } = await Http.get('device/strategy/' + deviceId)
    return data
}